Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » GLDraw
GLDraw [message #40784] Mon, 16 September 2013 10:54 Go to next message
mirek is currently offline  mirek
Messages: 14112
Registered: November 2005
Ultimate Member
New package GLDraw implements SDraw based Draw in OpenGL, as demonstrated in reference/GLDrawDemo.
Re: GLDraw [message #40787 is a reply to message #40784] Mon, 16 September 2013 19:35 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3398
Registered: August 2008
Senior Veteran
Hello Mirek

Compiling with MSC10 in Win7 I get these errors:

'GL_BGRA' : undeclared identifier
'GL_CLAMP_TO_EDGE' : undeclared identifier


Best regards
Iñaki
Re: GLDraw [message #40789 is a reply to message #40787] Tue, 17 September 2013 06:32 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1371
Registered: December 2006
Ultimate Contributor
koldo wrote on Mon, 16 September 2013 13:35

Hello Mirek

Compiling with MSC10 in Win7 I get these errors:

'GL_BGRA' : undeclared identifier
'GL_CLAMP_TO_EDGE' : undeclared identifier


Same with me.


Regards,
Novo
Re: GLDraw [message #40791 is a reply to message #40784] Tue, 17 September 2013 15:11 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1371
Registered: December 2006
Ultimate Contributor
On Linux:

.../main.cpp: In member function ‘virtual void OpenGLExample::GLPaint()’:
.../main.cpp:15:5: error: ‘class Upp::GLDraw’ has no member named ‘InitGL’


Regards,
Novo
Re: GLDraw [message #40792 is a reply to message #40784] Tue, 17 September 2013 19:02 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1371
Registered: December 2006
Ultimate Contributor
After fixing compilation it is flickering like crasy when resizing window in both Windows and Linux. And also size of centered text is changing ... Sad

Regards,
Novo
Re: GLDraw [message #40797 is a reply to message #40792] Thu, 19 September 2013 20:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14112
Registered: November 2005
Ultimate Member
Novo wrote on Tue, 17 September 2013 13:02

After fixing compilation it is flickering like crasy when resizing window in both Windows and Linux. And also size of centered text is changing ... Sad


Centering should be now fixed. Flickering is of not consequence, it is just quick example using GLCtrl, real usage will be different...
Re: GLDraw [message #40815 is a reply to message #40797] Sat, 21 September 2013 04:55 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1371
Registered: December 2006
Ultimate Contributor
Flickering is also gone ...
Thanks!


Regards,
Novo
Re: GLDraw [message #41335 is a reply to message #40784] Sun, 01 December 2013 21:47 Go to previous messageGo to next message
Tom1
Messages: 1253
Registered: March 2007
Senior Contributor
Hi,

I just tried the current reference/GLDrawDemo for the first time and run into trouble on Windows Vista Business 64 bit, using MSC9 32 bit:

1. In main.cpp I had to switch the order of includes:
#include <GLDraw/GLDraw.h>
#include <GLCtrl/GLCtrl.h>


because of this error:

main.cpp
c:\upp\uppsrc\gldraw\glew.h(84) : fatal error C1189: #error :  gl.h included before glew.h
GLDrawDemo: 1 file(s) built in (0:02.34), 2343 msecs / file, duration = 2375 msecs


2. In GLDrawS.cpp I had to rename two variables (called near and far) to something else, since confused the MSC9 32-bit compiler:

void GLOrtho(float left, float right, float bottom, float top, float nnear, float nfar, GLuint u_projection)


3. Finally, when linking I got this:
Linking...
GLDraw.lib(GLDrawS.obj) : error LNK2019: unresolved external symbol __imp____glewGetUniformLocation referenced in function "public: int __thiscall Upp::GLProgram::GetUniform(char const *)" (?GetUniform@GLProgram@
	Upp@@QAEHPBD@Z)
GLDraw.lib(GLDrawS.obj) : error LNK2019: unresolved external symbol __imp____glewUseProgram referenced in function "public: void __thiscall Upp::GLProgram::Use(void)" (?Use@GLProgram@Upp@@QAEXXZ)
GLDraw.lib(GLShaders.obj) : error LNK2001: unresolved external symbol __imp____glewUseProgram
GLDraw.lib(GLDrawS.obj) : error LNK2019: unresolved external symbol __imp____glewEnableVertexAttribArray referenced in function "void __cdecl Upp::initializeGL(void)" (?initializeGL@Upp@@YAXXZ)
GLDraw.lib(GLDrawS.obj) : error LNK2019: unresolved external symbol __imp____glewUniform1i referenced in function "void __cdecl Upp::initializeGL(void)" (?initializeGL@Upp@@YAXXZ)
GLDraw.lib(GLDrawS.obj) : error LNK2019: unresolved external symbol __imp__glewInit referenced in function "void __cdecl Upp::initializeGL(void)" (?initializeGL@Upp@@YAXXZ)
GLDraw.lib(GLDrawS.obj) : error LNK2019: unresolved external symbol __imp____glewUniformMatrix4fv referenced in function "void __cdecl Upp::GLOrtho(float,float,float,float,float,float,unsigned int)" (?GLOrtho@Upp
	@@YAXMMMMMMI@Z)
GLDraw.lib(GLDrawS.obj) : error LNK2019: unresolved external symbol __imp____glewDisableVertexAttribArray referenced in function "private: void __thiscall Upp::GLDraw::FlushPutRect(void)" (?FlushPutRect@GLDraw@Up
	p@@AAEXXZ)
GLDraw.lib(GLDrawS.obj) : error LNK2019: unresolved external symbol __imp____glewVertexAttribPointer referenced in function "private: void __thiscall Upp::GLDraw::FlushPutRect(void)" (?FlushPutRect@GLDraw@Upp@@AA
	EXXZ)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewDeleteShader referenced in function "public: void __thiscall Upp::GLProgram::Clear(void)" (?Clear@GLProgram@Upp@@QAEXXZ)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewDeleteProgram referenced in function "public: void __thiscall Upp::GLProgram::Clear(void)" (?Clear@GLProgram@Upp@@QAEXXZ)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewGetShaderInfoLog referenced in function "unsigned int __cdecl Upp::LoadShader(char const *,unsigned int)" (?LoadShader@Upp@@YAIPB
	DI@Z)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewGetShaderiv referenced in function "unsigned int __cdecl Upp::LoadShader(char const *,unsigned int)" (?LoadShader@Upp@@YAIPBDI@Z)
	
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewCompileShader referenced in function "unsigned int __cdecl Upp::LoadShader(char const *,unsigned int)" (?LoadShader@Upp@@YAIPBDI@
	Z)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewShaderSource referenced in function "unsigned int __cdecl Upp::LoadShader(char const *,unsigned int)" (?LoadShader@Upp@@YAIPBDI@Z
	)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewCreateShader referenced in function "unsigned int __cdecl Upp::LoadShader(char const *,unsigned int)" (?LoadShader@Upp@@YAIPBDI@Z
	)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewGetProgramInfoLog referenced in function "public: void __thiscall Upp::GLProgram::Create(char const *,char const *,struct Upp::Tu
	ple2<int,char const *> *,int)" (?Create@GLProgram@Upp@@QAEXPBD0PAU?$Tuple2@HPBD@2@H@Z)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewGetProgramiv referenced in function "public: void __thiscall Upp::GLProgram::Create(char const *,char const *,struct Upp::Tuple2<
	int,char const *> *,int)" (?Create@GLProgram@Upp@@QAEXPBD0PAU?$Tuple2@HPBD@2@H@Z)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewLinkProgram referenced in function "public: void __thiscall Upp::GLProgram::Create(char const *,char const *,struct Upp::Tuple2<i
	nt,char const *> *,int)" (?Create@GLProgram@Upp@@QAEXPBD0PAU?$Tuple2@HPBD@2@H@Z)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewBindAttribLocation referenced in function "public: void __thiscall Upp::GLProgram::Create(char const *,char const *,struct Upp::T
	uple2<int,char const *> *,int)" (?Create@GLProgram@Upp@@QAEXPBD0PAU?$Tuple2@HPBD@2@H@Z)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewAttachShader referenced in function "public: void __thiscall Upp::GLProgram::Create(char const *,char const *,struct Upp::Tuple2<
	int,char const *> *,int)" (?Create@GLProgram@Upp@@QAEXPBD0PAU?$Tuple2@HPBD@2@H@Z)
GLDraw.lib(GLShaders.obj) : error LNK2019: unresolved external symbol __imp____glewCreateProgram referenced in function "public: void __thiscall Upp::GLProgram::Create(char const *,char const *,struct Upp::Tuple2
	<int,char const *> *,int)" (?Create@GLProgram@Upp@@QAEXPBD0PAU?$Tuple2@HPBD@2@H@Z)
C:\upp\out\reference\MSC9.Gui.Sse2\GLDrawDemo.exe : fatal error LNK1120: 21 unresolved externals

There were errors. (0:04.78)


Can someone help me with this?

Best regards,

Tom
Re: GLDraw [message #41345 is a reply to message #41335] Mon, 02 December 2013 17:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14112
Registered: November 2005
Ultimate Member
Should be now fixed.

Mirek
Re: GLDraw [message #41353 is a reply to message #41345] Tue, 03 December 2013 15:50 Go to previous messageGo to next message
Tom1
Messages: 1253
Registered: March 2007
Senior Contributor
Thanks Mirek. 1. and 2. are now fixed, but the linking problem 3. is still there.

Tom
Re: GLDraw [message #41357 is a reply to message #41353] Tue, 03 December 2013 23:08 Go to previous messageGo to next message
Tom1
Messages: 1253
Registered: March 2007
Senior Contributor
OK, I'm now one step further after adding GLDraw package compiler option: WIN32: /DGLEW_STATIC

Now the demo compiles/links/runs, but with an empty (black) window interior.

How to proceed?

Best regards,

Tom
Re: GLDraw [message #41363 is a reply to message #41357] Wed, 04 December 2013 14:34 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14112
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 03 December 2013 17:08

OK, I'm now one step further after adding GLDraw package compiler option: WIN32: /DGLEW_STATIC

Now the demo compiles/links/runs, but with an empty (black) window interior.

How to proceed?

Best regards,

Tom


It now works for me (with some linker warnings) just as it is in repositry. MSC9/Win7.

Anything specific about your OS?
Re: GLDraw [message #41364 is a reply to message #41363] Wed, 04 December 2013 15:33 Go to previous messageGo to next message
Tom1
Messages: 1253
Registered: March 2007
Senior Contributor
Mirek,

I have now tested it on both Windows Vista Business 64 bit and Windows 7 Professional 64-bit. Both absolutely must have the GLEW_STATIC defined. Otherwise, I will get a large amount of compiler warnings for glew related stuff and also the 21 linker errors I reported previously. I'm compiling with MSC9 32-bit.

After defining the GLEW_STATIC, there are no such warnings or errors at all during GLDraw compilation nor executable linking. (Through GLDraw package compiler option WIN32: /DGLEW_STATIC).

--

Maybe the screen update problems are related to the low-end NVidia GeForce 6150 display adapter. Or maybe I should have some extra GL drivers for it on windows?

Best regards,

Tom
Re: GLDraw [message #41365 is a reply to message #41364] Wed, 04 December 2013 16:04 Go to previous messageGo to next message
Tom1
Messages: 1253
Registered: March 2007
Senior Contributor
OK, solved -- sort of. It works after I comment the following line in GLDraw.h:

#define GL_USE_SHADERS

So, I guess the old GeForce 6150 is too old and does not support shaders.

Best regards,

Tom
Re: GLDraw [message #44458 is a reply to message #41365] Fri, 13 March 2015 17:55 Go to previous message
ManfredHerr is currently offline  ManfredHerr
Messages: 67
Registered: February 2013
Location: Germany
Member
My computer runs both, WIN / XP prof. and UBUNTU 14.04 alternatively. The graphics card is a NVIDIA GT9600.
GLDraw demo compiles and runs on WIN / XP if TheIDE is adviced to use MSVC10.0 for building. MSVC8, that is installed as well, and used by default, gives an error about SPI_GETWHEELSCROLLINES.
Using UBUNTU I could not manage to see the same result. Here, I use gcc as build environment. Until I updated the driver to the latest propietary (NVIDIA) driver. I got error messages "shaders do not compile" or "heap leaks detected". Now, build and run gives no error messages but the window shows pure black, like Tom's experience. For a short moment the rectangle and two lines in the upper left corner appear before all is painted black.
Am I missing something?
Previous Topic: RichText/Qtf/RichEdit now support round borders for table cells
Next Topic: SpinLock
Goto Forum:
  


Current Time: Sun Nov 10 20:21:22 CET 2024

Total time taken to generate the page: 0.00658 seconds