thanks to all, by
- Viewing Profile: Posts: giugio
Community Stats
- Group Members
- Active Posts 1,111
- Profile Views 4,590
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
Posts I've Made
In Topic: mvc ,games and multicore
20 March 2013 - 11:26 AM
In Topic: mvc ,games and multicore
18 March 2013 - 05:26 AM
there are other parallelization ideas in promises and futures, or procedural programming with immutable data that open the door to parallel treatment but I have no knowledge of this applied in practice.
thanks Lightness1024 and what are these parallel new ideas?
can you advice to me a link or a book?
thnaks,
In Topic: opengl window and vbo vertexes
12 January 2013 - 08:57 AM
then the vbo points are related to the viewport, is correct?
If so
1)i can create a window of 400 x 400
2)set this vbo :
-1, -1, 0, -1, 1, 0, 1,1, 0,
3)set the ortho matrix with glm(m_MP = glm::ortho<GLfloat>(-1, 1, -1, 1); to
{1, 0, 0, 0}
{0, 1, 0, 0}
{0, 0, -1, 0}
{-0, -0, 0, 1}
4)all works fine.
but if:
1)ok,
2)set this vbo
0, 0, 0, 0,400,0 400,400,0
3)the ortho matrix sended to the shader as a mvp(now i change the name) is :
{0.0049999999, 0, 0, 0}
{0, 0.0049999999, 0, 0}
{0, 0, -1, 0}
{-1, -1, 0, 1}
but,i see nothing
this is all that i change , from the first to the second i change only the ortho projection and the vbo points from -1 1 to 0 400 ecc....
thanks again for your help, and sorry if i 'm a newbe
and the mview matrix is to use? i suppose that is identity .
by.
In Topic: opengl window and vbo vertexes
12 January 2013 - 07:04 AM
also if i set this
HWND hWnd = CreateWindowEx
(wndExStyle, wcl.lpszClassName, "title",
wndStyle, 0, 0, 1920, 1080, 0, 0, wcl.hInstance, 0);
to
HWND hWnd = CreateWindowEx
(wndExStyle, wcl.lpszClassName, "title",
wndStyle, 0, 0, 800, 600, 0, 0, wcl.hInstance, 0);
if i set the viewport to 1920w 1080h all work fine.
what can be'
In Topic: opengl window and vbo vertexes
12 January 2013 - 06:57 AM
I see a problem:
if i use a glViewport(0, 0, 1920, 1080); that is my full resolution screen all works fine, but if i use a 800 x 600 glViewport(0, 0, 800, 600); the triangle is an half of the correct rectangle that must occupy the half of the screen.
Then the error may be in the creation of the window?
this is my window's creation code:
HWND CreateAppWindow(const WNDCLASSEX &wcl, const char *pszTitle)
{
// Create a window that is centered on the desktop. It's exactly 1/4 the
// size of the desktop. Don't allow it to be resized.
int n = 0;
DWORD wndExStyle = WS_EX_OVERLAPPEDWINDOW;
DWORD wndStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU |
WS_MINIMIZEBOX | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
HWND hWnd = CreateWindowEx
(wndExStyle, wcl.lpszClassName, "title",
wndStyle, 0, 0, 1920, 1080, 0, 0, wcl.hInstance, 0);
if (hWnd)
{
int screenWidth = GetSystemMetrics(SM_CXSCREEN);
int screenHeight = GetSystemMetrics(SM_CYSCREEN);
int halfScreenWidth = screenWidth / 2;
int halfScreenHeight = screenHeight / 2;
int left = (screenWidth - halfScreenWidth) / 2;
int top = (screenHeight - halfScreenHeight) / 2;
RECT rc = {0};
SetRect(&rc, left, top, left + halfScreenWidth, top + halfScreenHeight);
AdjustWindowRectEx(&rc, wndStyle, FALSE, wndExStyle);
MoveWindow(hWnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
GetClientRect(hWnd, &rc);
m_windowWidth = rc.right - rc.left;
m_windowHeight = rc.bottom - rc.top;
}
return hWnd;
};
- Home
- » Viewing Profile: Posts: giugio

Find content