1
Graphics / Re: How to draw a single pixel?
« on: March 25, 2014, 05:11:43 pm »
Thanks for the responses. I'll try to use a vertex array.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
What exactly are you trying to achieve?
Yes, you can use a vertex array of points.
Otherwise you could use a rectangle shape with size 1x1 or a sprite.
Depending on what you want to do, you might want to look into shaders.
And if you want to edit pixels, you could think about using an sf::Image or your own vector of sf::Uint8.
What happens if you tell CMake to use the default compiler toolchain (i.e. don't specify cl.exe or any other file)?
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 12.0.21005.1
[Microsoft .NET Framework, version 4.0.30319.18408]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 3/12/2014 11:58:08 PM.
Project "L:\prg\libsrc\SFML\SFML-2.1_build_Debug\CMakeFiles\2.8.12.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
E:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(355,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [L:\prg\libsrc\SFML\SFML-2.1_build_Debug\CMakeFiles\2.8.12.2\CompilerIdC\CompilerIdC.vcxproj]
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
E:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /nologo /W0 /WX- /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TC /analyze- /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
E:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X86 /SAFESEH Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [L:\prg\libsrc\SFML\SFML-2.1_build_Debug\CMakeFiles\2.8.12.2\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "L:\prg\libsrc\SFML\SFML-2.1_build_Debug\CMakeFiles\2.8.12.2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
Build FAILED.
The C compiler identification is unknown
The CXX compiler identification is unknown
Build started 3/12/2014 11:21:17 PM.
Project "L:\prg\libsrc\SFML\SFML-2.1_build_Debug\CMakeFiles\2.8.12.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
L:\prg\libsrc\SFML\SFML-2.1_build_Debug\CMakeFiles\2.8.12.2\CompilerIdC\CompilerIdC.vcxproj(14,3): error MSB4019: The imported project "L:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
Check size of void* - failed
CMake Error at cmake/Config.cmake:13 (message):
Unsupported architecture
The C compiler "E:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/cl.exe" is not able to compile a simple test program.
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
set PATH = %PATH%; E:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A
set PATH = %PATH%; E:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib
hWnd = CreateWindow(
szWindowClass,
szTitle,
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
0,
1000 + (GetSystemMetrics(SM_CXFRAME) * 2), // Initial window width
1000 + (GetSystemMetrics(SM_CYFRAME) * 2) +
GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYMENU), // Initial height
NULL,
NULL,
hInstance,
NULL);
m_pRendWnd = new sf::RenderWindow( hWnd );
if ( m_pRendWnd ) {
m_pRendWnd->setActive(false);
m_pRendWnd->close();
delete m_pRendWnd;
}
WGL Message:WGL: DDraw: UpdateClipList: GetClipList (1): DDERROR = DDERR_GENERICWhy this message is displayed?
WGL Message:WGL: DDraw: UpdateClipList: GetClipList (2): DDERROR = DDERR_GENERIC
WGL Message:System Error: (1114):dettachMessageHook