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 » Critical issues to resolve for U++ 2018.1 - please suggest
Issues with OpenGL [message #49285 is a reply to message #49280] Mon, 15 January 2018 22:00 Go to previous messageGo to previous message
ren42 is currently offline  ren42
Messages: 12
Registered: July 2006
Promising Member
Hi Mirek,

I tried to compile the reference/GLDrawDemo example but compiling fails:
/home/thomas/upp/uppsrc/GLDraw/GLDrawS.cpp (245):
error: non-constant-expression cannot be narrowed from type 'int' to 'GLshort' (aka 'short') in initializer list [-Wc++11-narrowing]


I was able to fix these errors with three changes in GLDrawS.cpp:


Line 244
//	GLshort vertex[] = {
	GLint vertex[] = { 
	    rect.left, rect.top,
	    rect.left, rect.bottom,
	    rect.right, rect.bottom,
	    rect.right, rect.top,
	};
Line 307
//	GLshort vertex[] = {
	GLint vertex[] = {
	    r.left, r.top,
	    r.left, r.bottom,
	    r.right, r.bottom,
	    r.right, r.top,
	};
Line 373
//	GLshort vertex[] = {
	GLint vertex[] = {
	    rect.left, rect.top,
	    rect.left, rect.bottom,
	    rect.right, rect.bottom,
	    rect.right, rect.top,
	};

With this changes it compiled and run but...
the window shows only a copy of the screen "behind" it
instead of rendering what this example want.

Is the type change from GLshort to GLint ok?
Or is there something wrong with OpenGL?

my System:OpenSuse Leap42.2 Upp2017.2 clang

Thanks in advance,
Thomas
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Painter refactored/optimized
Next Topic: usecs
Goto Forum:
  


Current Time: Sat May 10 00:55:54 CEST 2025

Total time taken to generate the page: 0.03479 seconds